package com.mostromas.ess.entities;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.google.common.collect.Lists;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 面料实体
 */
@ApiModel(value = "Fabric对象",description = "面料实体类")
@TableName("mr_fabric")
@Data
public class Fabric implements Serializable {
    private static final long serialVersionUID = -6805178720116436310L;

    /**
     * 主键，分布式ID
     */
    @ApiModelProperty(value = "主键")
    @TableId(value = "id",type = IdType.ASSIGN_ID)
    private String id;

    /**
     * 面料名称
     */
    @ApiModelProperty(value = "面料名称")
    private String name;

    /**
     * 供应商ID
     */
    @ApiModelProperty(value = "供应商ID")
    private String supplierId;

    /**
     * 排序
     */
    @ApiModelProperty(value = "排序")
    private Integer sort;

    /**
     * 面料成分集合
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "面料成分集合" ,required=true)
    private List<FabricComposition> compositionList = Lists.newArrayList();

}
